package com.cheejee.goodscenter.service.exception;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * 参数校验未通过时抛出此异常
 * 
 * @author CARRY
 * @Date 2020年10月22日下午3:19:43
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ToString
public class CheckException extends RuntimeException {

	private static final long serialVersionUID = 8214860932101788438L;

	/**
	 * 异常信息
	 */
	private String checkMessage;

	/**
	 * 进行校验的参数名
	 */
	private String paramName;

	/**
	 * 进行校验的参数实体
	 */
	private String param;

	/**
	 * 进行校验的完整方法签名
	 */
	private String methodSignature;

	public CheckException(String checkMessage) {
		super(checkMessage);
		this.checkMessage = checkMessage;
	}
}
